

/*------------------------------------------------------------------------------------------------------------------------
This replicate the numbers for the tabels and figures in the ARTICLE "How video information on mammography 
screening affects the recommendations of laypeople: a randomised controlled trial.
by Manja D. Jensen, Kasper M. Hansen, Volkert Siersma and John Brodersen.
--------------------------------------------------------------------------------------------------------------------------*/



/*The two dataset used:*/
/* libname manja "INSERT FILE PATH"; run;   
data Importrecode; set manja.Importrecode;run;
data screeningagegroup; set manja.screeningagegroup;run;	
*/

/*The datasets contain surveydata. For question wording see supplementary file S2_Fig (Questionnaire)in the article 
"Using a Deliberative Poll on breast cancer screening to assess and imrove the decision quality of laypeople" PLOSONE, 2021
by Manja D. Jensen, Kasper M. Hansen, Volkert Siersma and John Brodersen.

/*note: The analyses into relative importance was done in R and uses a set of procedures we have developed - and which are 
still under development - to solve a broad range of problems dealing with relative importance. As these procedures will be 
the basis for a future paper in statistical methods development, we cannot publish these procedures at this moment. 
The data for the analyses into relative importance in the present paper is made available though, and the description of 
the analyses in the paper and the references would be enough for a statistician to reproduce these analyses. */



/*----------------------------------VARIABLES in the dataset "IMPORTRECODE"---------------------------------------------
Randomgr: Randomised groups, 1=intervention, 2=control
Aldersgruppe: Agegroups, 0=0-17, 1=18-30, 2=31-40, 3=41-50, 4=51-60, 5=61-70, 6=71-80, 7=>80.
Brystkraeft: History of breast cancer in the family, 1=yes, 2=no.
Bekymret1: Worry, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
CivilNY: Marital status, 1=never married, 2=married or civil partnership, 3=widowed, 4=divorced.
Koen: Sex, 1=man, 2=woman
Region: Region of recidence, 1=capital, 2=Zealand, 3=South, 4=Central, 5=North
Sundhed: Working/educated within the healthcare sector (1=yes 2=no)
GennemfoertuddNY: Education, 1=7-13 years, 2=Vocational, 3=Short further, 4=Middle further, 5=Long further.
Completers: Participants completing survey (completing the primary outcome question V3). 1=completing V3, 99= not completing V3.
RandomV3: Randomised (1=intervention group, 2=control group) AND answering the recommendation question (V3).
V3: Recommendation, "Continue mammography screening?", 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
V3HeltE: Dichothomised variable (V3 - Strongly agree: 1=Strongly agree, 3= all other answers)
V1: Screening intention, 1= Would participate, 2=Would not participate, 999= Don't know.
V1JA: Dichothomised variable, Screening intention, Would participate=1, 3=all other answers.
K1korrekt: Conceptual knowledge question, Not all breast cancers cause illness, 1=correct, 0=incorrect answer.
K2korrekt: Conceptual knowledge question, Screening will not find every breast cancer, 1=correct, 0=incorrect answer.
K3korrekt: Conceptual knowledge question, Screening reduces breast cancer deaths, 1=correct, 0=incorrect answer.
K4korrekt: Conceptual knowledge question, Screening increases breast cancer diagnoses, 1=correct, 0=incorrect answer.
K5korrekt: Conceptual knowledge question, Screening leads to some women getting unnecessary treatment, 1=correct, 0=incorrect answer.
K6korrekt: Conceptual knowledge question, The meaning of false positive results, 1=correct, 0=incorrect answer.
K7korrekt: Conceptual knowledge question, Screening may result in prolonged life as a patient, 1=correct, 0=incorrect answer.
K8korrekt: Conceptual knowledge question, Screening is for women without symptoms, 1=correct, 0=incorrect answer.
K9korrekt: Conceptual knowledge question, Benefit evaluation � reduced mortality, 1=correct, 0=incorrect answer. 
N1gist: Numerical knowledge questions, Breast cancer mortality without mammography screening, 1=correct, 0=incorrect answer.
N2gist: Numerical knowledge questions, Breast cancer mortality with mammography screening, 1=correct, 0=incorrect answer.
N3gist: Numerical knowledge questions, Overdiagnosis, 1=correct, 0=incorrect answer.
N4gist: Numerical knowledge questions, False positives, 1=correct, 0=incorrect answer.
Videnspoint: Knowledge score = the sum of correct answers to all knowledge questions *7.6923)
Vidensniveau: Knowledge level, 1=<33.333 knowledge score (low level), 2<= 66.666 knowledge score (middle level), 3= >66.666 knowledge score (high level).
Key1: Effect, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key2: Costs, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key3: Qualified, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key4: Mandatory 1, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key5: Mandatory 2, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key6: Ethics, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key7: Acquaintances, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key10: Regret, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Key11: Seen, 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Polit: Politics, 1=much conficence, 2=little confidence, 3Neither, 4=little distrust, 5=much distrust 6=Don't know.
SST: Authorities,1=much conficence, 2=little confidence, 3Neither, 4=little distrust, 5=much distrust 6=Don't know.
Vaegt: Balance, 1=most in agreement with A, 2=most in agreement with B, 3=Don't know, 4=Neither agreeing with A nor B.
Tilhaenger: Support, 1= Strong support, 2=support, 3=neither, 4= opponent 5=strong opponent, 6=don't know.
Tidmin: Time in minutes
Setvideo: Self rated compliance, 1=not watched the video, 2= Watched some of it, 3= Watched the hole, 999= don't know.
Video1: "pushing opinion", 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Video2: "added new knowledge" 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Video3: "made opinions more nuanced" 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Video4: "I feel prepered" 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Video5: "Too difficult" 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
Video6: "I would recommend it" 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.




/*----------------------------------VARIABLES in the dataset "screeningagegroup"---------------------------------------------
The dataset only contain five variables - responses from women in the screening agegroup (50-69 years).

Randomgr: Randomised groups, 1=intervention, 2=control.
V3: Recommendation, "Continue mammography screening?", 1=Strongly agree, 2=somewhat agree, 3=Neither nor, 4=Somewhat disagree, 5=strongly disagree, 6=Don't know.
V3HeltE: V3HeltE: Dichothomised variable (V3 - Strongly agree: 1=Strongly agree, 3= all other answers)
V1: V1: Screening intention, 1= Would participate, 2=Would not participate, 999= Don't know.
V1JA: Dichothomised variable, Screening intention, Would participate=1, 3=all other answers.






/*-------------------------------FLOW DIAGRAM, RANDOMISED, COMPLETERS, DROP-OUTS---------------------------------------*/

proc freq data=Importrecode; /*Number randomised*/
tables Randomgr;
run;
proc freq data=Importrecode; /*First sociodemographic question*/
tables aldersgruppe*Randomgr/ nopercent norow nocol;
run;
proc freq data=Importrecode; /*Last sociodemographic question*/
tables Sundhed*Randomgr/ nopercent norow nocol;
run;
proc freq data=Importrecode; /*First knowledge question*/
tables K1*Randomgr/ nopercent norow nocol;
run;
proc freq data=Importrecode; /*Last knowledge question*/
tables N4*Randomgr/ nopercent norow nocol;
run;
proc freq data=Importrecode; /*First opinion question*/
tables Vaegt*Randomgr/ nopercent norow nocol;
run;
proc freq data=Importrecode; /*Last opinion question*/
tables Key11*Randomgr/ nopercent norow nocol;
run;
Proc freq data=Importrecode; /*Recommendation question*/
tables V3*Randomgr;
run;
Proc freq data=Importrecode; /*Completers = all answering V3 (=1) otherwise (99)*/
tables Completers *Randomgr;
run;



/*------------------------------------TABLE "PARTICIPANT CHARACTERISTICS"------------------------------------------------------------------------*/

/*Left column with randomised participants*/
proc freq data=Importrecode;
tables (aldersgruppe brystkraeft bekymret1 civilNY koen region sundhed GennemfoertuddNY)*randomgr / nopercent norow;
run;

/*Right column with "completers". participants answering the question regarding continuation (primary outcome) */
proc freq data=Importrecode;
tables (aldersgruppe brystkraeft bekymret1 civilNY koen region sundhed GennemfoertuddNY)*RandomV3 / nopercent norow;
run;

/*Chi-squared test - Tests the 0-hypothesis (= there is no difference between 
completers in the intervention and control group.)*/

Data Tabelalder;
Input data $ alder$ antal;
datalines;
Intervention 1830 42
Intervention 3140 16
Intervention 4150 18
Intervention 5160 31
Intervention 6170 33
Intervention 7180 12
Intervention 80 1
Control 1830 52
Control 3140 21
Control 4150 19
Control 5160 42
Control 6170 56
Control 7180 19
Control 80 2
Proc freq data=Tabelalder;
Table data*alder/chisq;
Weight antal;
Run;

data tabelkoen;
input data$ koen$ antal;
datalines;
Intervention kvinde 98
Intervention mand 55
Control kvinde  92
Control mand 119
proc freq data=tabelkoen;
tables data*koen
/ nopercent nocol chisq expected riskdiffc;
weight antal;
run;

Data Tabeludd;
Input data $ udd$ antal;
datalines;
Intervention 713 28
Intervention vocational 16
Intervention short 9
Intervention mid 50
Intervention long 50
Control 713 49
Control vocational 19
Control short 12
Control mid 82
Control long 49
;
run;
Proc freq data=Tabeludd;
Table data*udd/chisq;
Weight antal;
Run;

data tabelres;
input data$ res$ antal;
datalines;
Intervention Capital 81
Intervention Zeal 16
Intervention South 23
Intervention Central 28
Intervention North 5
Control Capital 98
Control Zeal 19
Control South 39
Control Central 44
Control North 11
;
run;
Proc freq data=Tabelres;
Table data*res/chisq;
Weight antal;
Run;

Data TabelCivilstatus;
Input data$ Civilstatus$ antal;
Datalines;
Intervention Never 44
Intervention Married 89
Intervention Divorced 19
Intervention Widowed 1
Control Never 86
Control Married 98
Control Divorced 23
Control Widowed 4
;
Run;
Proc freq data=TabelCivilstatus;
Table data*civilstatus/chisq;
Weight antal;
Run;

data tabelHealthcare;
input data$ Health$ antal;
datalines;
Intervention ja 48
Intervention nej 105
Control ja 49
Control nej 162
;
run;
proc freq data=tabelHealthcare;
tables data*Health
/ nopercent nocol chisq expected riskdiffc;
weight antal;
run;

data tabelHistory;
input data$ History$ antal;
datalines;
Intervention ja 60
Intervention no 89
Intervention dontknow 4
Control ja 64
Control no 141
Control dontknow 6
proc freq data=tabelHistory;
tables data*History
/ nopercent nocol chisq expected riskdiffc;
weight antal;
run;




/*---------------------------- BARCHART, RECOMMENDATION "Continue mammography screening?", (Left side)- All participants (completers),----------------------------*/
proc freq data=Importrecode;
tables V3*Randomgr/ chisq expected riskdiffc; 
run;

/*Chi-squared test: differens, "strongly agree" */
proc freq data=Importrecode; /*1=strongly agree, 3=all other answers*/
tables randomgr* (V3HeltE) / expected riskdiff relrisk nopercent nocol chisq;
run; 



/*---------------------------- BARCHART, RECOMMENDATION  "Continue mammography screening?, (Right side) - "Women in screening agegroup,
/Screening agegroup defined as.: koen=2, alderscreening=1 (dataset "screningagegroup")-----*/
proc freq data=screeningagegroup;
tables V3*randomgr/ chisq expected riskdiffc; 
run;

/*Chi-squared test: differens, "strongly agree" */
proc freq data=screeningagegroup; /*1=strongly agree, 3=all other answers*/
tables randomgr* (V3HeltE) / expected riskdiff relrisk nopercent nocol chisq;
run;




/*---------------------------- BARCHART, SCREENING INTENTION (women in screening agegroup)-------------------------------------*/
proc freq data=screeningagegroup;
tables V1*randomgr/ chisq expected riskdiffc; 
run;

/*Chi-squared test: differens, "strongly agree" */
proc freq data=screeningagegroup; /*1=strongly agree, 3=all other answers*/
tables randomgr* (V1JA) / expected riskdiff relrisk nopercent nocol chisq;
run;




/*---------------------------- BARCHART, LEVEL OF KNOWLEDGE ---------------------------------------------------------*/
proc freq data=Importrecode;
tables Vidensniveau*Randomgr;
run;

proc freq data=Importrecode;
tables Vidensniveau*Randomgr / nopercent nocol chisq expected riskdiffc;
run;

/*Controlling for sex because of unequal dropout of men and women in the intervention and control group*/
proc freq data=Importrecode;
tables koen*Vidensniveau*Randomgr /cmh;
run;




/*----------------------------- TABLE LEVEL OF KNOWLEDGE---------------------------------------------------------------*/

/* % Correct knowledge items*/
proc freq data=Importrecode;
tables randomgr *(K1korrekt K2korrekt  K3korrekt K4korrekt  K5korrekt K6korrekt K7korrekt K8korrekt K9korrekt  N1gistkorrekt N2gistkorrekt N3gistkorrekt N4gistkorrekt);
run;

/* chi squared test*/
Proc freq data=Importrecode;
Table randomgr* (K1korrekt K2korrekt  K3korrekt K4korrekt  K5korrekt K6korrekt K7korrekt K8korrekt K9korrekt  N1gistkorrekt N2gistkorrekt N3gistkorrekt N4gistkorrekt)/chisq;
Run;

/* Knowledge score, mean score in the two groups + T-test */
proc means data=Importrecode;
var Videnspoint;
class Randomgr;
run;

proc ttest data=Importrecode;
var Videnspoint;
class Randomgr;
run;




/*------------------------- BARCHART, OPINION FORMATION, % don't know answers (don't know=999)*/
/*Key1=effect, Key2=Coat, Key3=qualified, Key4=mandatory1, Key5=mandatory2, Key6=ethics, key7=acquaintances, Key10=regret, Key11=seen*/
proc freq data=Importrecode;
tables randomgr *(Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key10 Key11 Polit SST Bekymret1 Vaegt Tilhaenger);
run;

proc freq data=Importrecode;
tables randomgr *(Key1DN Key2DN Key3DN Key4DN Key5DN Key6DN Key7DN Key10DN Key11DN PolitDN SSTDN Bekymret1DN VaegtDN TilhaengerDN)/chisq;
run;




/*------------------------- BARCHART, WORRY ABOUT BREAST CANCER---------------------------------------------------*/
/*999="dont know", 1=strongly agree, 2=somewhat agree, 3=neither nor, 4 somewhat disagree, 5=strongly disagree*/
proc freq data=Importrecode;
tables randomgr * Bekymret1;
run;

/*chi-squared test*/
Proc freq data=Importrecode;
Table randomgr* Bekymret1/chisq;
Run;




/*------------ ---------------TIME CONSUMPTION AND COMPLIANCE------------------------------------------------------*/
proc means data=Importrecode;
var tidmin;
class randomgr completers;
run;

/*Compliance - completers */
proc freq data=Importrecode;
tables randomgr*completers *setvideo / nopercent nocol chisq;
run;




/*----------------------------PARTICIPANTS EVALUATION OF THE VIDEO-------------------------------------------------*/

/* Form�l at skubbede holdning*/
proc freq data=Importrecode;
tables Video1*randomgr/ norow;
run;

/*Added new knowledge*/
proc freq data=Importrecode;
tables Video2*randomgr/ norow;
run;

/*More nuanced*/
proc freq data=Importrecode;
tables Video3*randomgr/ norow;
run;

/*Prepered*/
proc freq data=Importrecode;
tables Video4*randomgr/ norow;
run;

/*Too difficult*/
proc freq data=Importrecode;
tables Video5*randomgr/ norow;
run;

/*Reccommendation*/
proc freq data=Importrecode;
tables Video6*randomgr/ norow;
run;
